package com.camunda7.workflow.listener;


import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.ExecutionListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component("demoListener")
public class DemoListener implements ExecutionListener {
    @Override
    public void notify(DelegateExecution execution) throws Exception {
        Map<String, Object> variables = execution.getVariables();

        System.out.println("DemoListener");
        for (Map.Entry<String, Object> entry : variables.entrySet()) {
            System.out.println(entry.getKey()+":"+entry.getValue());
        }

    }
}
